package com.xiaoyyu;

import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.HighGui;
import org.opencv.imgcodecs.Imgcodecs;


public class Main {

    static {
        //必须要写
        System.out.println("开始运行......");
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        System.out.println("opencv\t"+Core.VERSION);
    }

    public static void main(String[] args) {
        new Main().test();
    }

    public void test(){
        Mat src= Imgcodecs.imread("jianghu.jpg");
        HighGui gui=new HighGui();
        gui.imshow("哈妮",src);
        gui.waitKey(1000);
    }

}
